package net.studou.po;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import net.studou.annotation.FixedKeyAnnotation;
import net.studou.annotation.IConvertAnnotation;
import net.studou.annotation.KeyValue;
import net.studou.annotation.SecretStatusAnnotation;
import net.studou.annotation.SecretType;
import net.studou.annotation.SignatureAnnotation;
import net.studou.annotation.SignatureMark;
import net.studou.annotation.WillSecretAnnotation;

/**
 * User entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class User implements java.io.Serializable {
	public static final int NORMAL = 0;
	public static final int FORBID = 1;
	public static final int LOCKED = 2;
	private static final long serialVersionUID = -106072210471851354L;

	private Integer userId;
	@FixedKeyAnnotation
	private String userName;
	@WillSecretAnnotation(KeyValue.PASSWORD)
	private String password;
	@WillSecretAnnotation(KeyValue.OPERATECODE)
	private String operateCode;
	private String tbUrl;
	private String shopKeeper;
	private String qq;
	private String ip;
	private Date loginTime;
	private Date createTime;
	private Integer status;
	private Date modifyStatusTime;
	private Integer onoffline;

	@SignatureAnnotation()
	private Double money;
	@SignatureAnnotation()
	private Double publishPoint;
	@SignatureAnnotation()
	private Double publishPointReward;
	@SignatureAnnotation()
	private Integer integral;
	@SignatureAnnotation()
	private Integer warning;
	@SignatureAnnotation(SignatureMark.TOTAL)
	private String signature;
	private User parentUser;
	private int version;

	private Set<UserPopedom> userPopedoms = new HashSet<UserPopedom>(0);
	private Set<Smaller> smallers = new HashSet<Smaller>(0);
	private Set<Task> ownTasks = new HashSet<Task>(0);
	private Set<Task> othersTasks = new HashSet<Task>(0);

	@SecretStatusAnnotation
	private SecretType secretType; // 数据库没有对应没有对应，只是判断当前po的加密状态
	@IConvertAnnotation(key = "lastLoginTime:lastLoginTime", convertClassName = "StringToDateTimeConvert")
	private Date lastLoginTime; // 数据库没有对应, 用来记住上一次的登录信息
	private String lastLoginIP; // 数据库没有对应, 用来记住上一次的登录信息
	
	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getOperateCode() {
		return this.operateCode;
	}

	public void setOperateCode(String operateCode) {
		this.operateCode = operateCode;
	}

	public String getTbUrl() {
		return this.tbUrl;
	}

	public void setTbUrl(String tbUrl) {
		this.tbUrl = tbUrl;
	}

	public String getShopKeeper() {
		return this.shopKeeper;
	}

	public void setShopKeeper(String shopKeeper) {
		this.shopKeeper = shopKeeper;
	}

	public String getQq() {
		return this.qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getIp() {
		return this.ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public Date getLoginTime() {
		return this.loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getModifyStatusTime() {
		return this.modifyStatusTime;
	}

	public void setModifyStatusTime(Date modifyStatusTime) {
		this.modifyStatusTime = modifyStatusTime;
	}

	public Integer getOnoffline() {
		return this.onoffline;
	}

	public void setOnoffline(Integer onoffline) {
		this.onoffline = onoffline;
	}

	public Double getMoney() {
		return money;
	}

	public void setMoney(Double money) {
		this.money = money;
	}

	public Double getPublishPoint() {
		return publishPoint;
	}

	public void setPublishPoint(Double publishPoint) {
		this.publishPoint = publishPoint;
	}

	public Double getPublishPointReward() {
		return publishPointReward;
	}

	public void setPublishPointReward(Double publishPointReward) {
		this.publishPointReward = publishPointReward;
	}

	public Integer getIntegral() {
		return integral;
	}

	public void setIntegral(Integer integral) {
		this.integral = integral;
	}

	public Integer getWarning() {
		return warning;
	}

	public void setWarning(Integer warning) {
		this.warning = warning;
	}

	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public String getSignature() {
		return signature;
	}

	public void setSignature(String signature) {
		this.signature = signature;
	}

	public SecretType getSecretType() {
		return secretType;
	}

	public void setSecretType(SecretType secretType) {
		this.secretType = secretType;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getLastLoginIP() {
		return lastLoginIP;
	}

	public void setLastLoginIP(String lastLoginIP) {
		this.lastLoginIP = lastLoginIP;
	}

	public User getParentUser() {
		return parentUser;
	}

	public void setParentUser(User parentUser) {
		this.parentUser = parentUser;
	}

	public Set<UserPopedom> getUserPopedoms() {
		return this.userPopedoms;
	}

	public void setUserPopedoms(Set<UserPopedom> userPopedoms) {
		this.userPopedoms = userPopedoms;
	}

	public Set<Smaller> getSmallers() {
		return this.smallers;
	}

	public void setSmallers(Set<Smaller> smallers) {
		this.smallers = smallers;
	}

	public Set<Task> getOwnTasks() {
		return ownTasks;
	}

	public void setOwnTasks(Set<Task> ownTasks) {
		this.ownTasks = ownTasks;
	}

	public Set<Task> getOthersTasks() {
		return othersTasks;
	}

	public void setOthersTasks(Set<Task> othersTasks) {
		this.othersTasks = othersTasks;
	}

}